% V20210224 - 8.7.16 Swipeable Listview Full Example INCLUDE "GW.bas" mypage = GW_NEW_PAGE() GW_ADD_TEXT(mypage, "User mailbox. Swipe left/right for options") ARRAY.LOAD emails$[], ~ "Answer|John Doe\nUrgent - Can you please...|Delete", ~ "Answer|Adam Parker\nHey mate, how's the ...|Delete", ~ "Answer|Sophia Stall\nMeeting|Delete" lv = GW_ADD_LISTVIEW(mypage, emails$[]) lv$ = GW_ID$(lv) GW_RENDER(mypage) DO % Wait for user action. r$ = GW_WAIT_ACTION$() IF IS_IN(lv$, r$) = 1 % message of the form 'listview_id>option#row' opt$ = MID$(r$, IS_IN(">",opt$)+1) IF IS_IN("Delete", opt$) = 1 opt$ = MID$(opt$, IS_IN("#",opt$)+1) row = VAL(opt$) GW_HIDE_LISTVIEW_ROW(lv, row) ELSE POPUP opt$ END IF END IF % End when BACK key is pressed. UNTIL r$ = "BACK" END